using System;

[Serializable]
public struct VehicleUpgradeInfo
{
	public float upgradeMultiplier;

	public MoneyType moneyType;

	public int cost;

	public VehicleUpgradeInfo(float upgradeMultiplier, MoneyType moneyType, int cost)
	{
		this.upgradeMultiplier = upgradeMultiplier;
		this.moneyType = moneyType;
		this.cost = cost;
	}

	public VehicleUpgradeInfo(string upgradeMultiplier, string moneyType, string cost)
	{
		float.TryParse(upgradeMultiplier, out this.upgradeMultiplier);
		int result;
		if (int.TryParse(moneyType, out result))
		{
			this.moneyType = (MoneyType)result;
		}
		else
		{
			this.moneyType = MoneyType.Gold;
		}
		int.TryParse(cost, out this.cost);
	}
}
